package com.cq.hd.common.enums.biz;

import lombok.Getter;

/**
 * 经纪人申请审核状态：状态(0-未申请，1-待审核，2-已通过，3-未通过)
 */
public enum AgentBindApplyAuditStateEnum {

    AUDIT_NONE(0, "未申请"),
    AUDIT_PENDING(1, "待审核"),
    AUDIT_PASS(2, "已通过"),
    AUDIT_REJECT(3, "未通过"),
    ;

    @Getter
    private final Integer value;

    @Getter
    private final String name;

    AgentBindApplyAuditStateEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static AgentBindApplyAuditStateEnum typeOf(Integer value) {
        AgentBindApplyAuditStateEnum[] values = AgentBindApplyAuditStateEnum.values();
        for (AgentBindApplyAuditStateEnum v : values) {
            if (v.value.equals(value)) {
                return v;
            }
        }
        return null;
    }

    public static AgentBindApplyAuditStateEnum typeOf(String name) {
        AgentBindApplyAuditStateEnum[] values = AgentBindApplyAuditStateEnum.values();
        for (AgentBindApplyAuditStateEnum v : values) {
            if (v.name.equals(name)) {
                return v;
            }
        }
        return null;
    }

}
